package com.exmaple.smart.gwt.client.ui.view;

import com.exmaple.smart.gwt.client.ui.widgets.ContextAreaListGrid;
import com.google.gwt.core.client.GWT;
import com.smartgwt.client.widgets.layout.VLayout;

import com.google.gwt.core.client.GWT;
import com.smartgwt.client.widgets.Canvas;
import com.smartgwt.client.widgets.layout.VLayout;

public class AccountView extends VLayout {

	private static final String DESCRIPTION = "AccountsView";

	public AccountView() {
		super();

		GWT.log("init AccountsView()...", null);

		// initialise the Accounts View layout container
		this.addStyleName("crm-ContextArea");
		this.setWidth("*");

		// add the List Grid to the Accounts View layout container
		this.addMember(new ContextAreaListGrid());
	}

	public static class Factory implements ContextAreaFactory {

		private String id;

		public Canvas create() {
			AccountView view = new AccountView();
			id = view.getID();

			GWT.log("AccountsView.Factory.create()->view.getID() - " + id, null);
			return view;
		}

		public String getID() {
			return id;
		}

		public String getDescription() {
			return DESCRIPTION;
		}
	}
}